#pragma once
#include "IDisposable.h"
#include "Common.h"
#include "VertexBuffer.h"
#include "IndexBuffer.h"
#include "Enums.h"
#include "BufferBindingList.h"


class ILayout;

class EXPORT Mesh : public IDisposeable
{
	VertexBuffer vBuffer;
	IndexBuffer iBuffer;
	BufferBindingList bbList;

	int vCount;
	int iCount;

public:
	Mesh(void);
	~Mesh(void);

	void Dispose();
	void Draw();
	void DrawIndexed();

	void SetVertexData(void * data,unsigned int size,int vertexCount,Usage usage);
	void SetIndexData(void * data,unsigned int size,int indexCount,Usage usage);

	void BeginSetUp();
	void EndSetUp();

	void SetLayout(ILayout * layout);
};

